package a.f;

import a.c.*;
import a.c.v;
import a.c.z;
import a.d.s;
import a.d.w;
import a.f.e.a;
import a.f.e.c;

public class y
  extends r
{
  private a g = new c();
  public static boolean h;
  
  public y()
  {
    this.g.e(true);
    this.g.d(true);
  }
  
  public void a(a parama)
  {
    this.g = parama;
  }
  
  public a b()
  {
    return this.g;
  }
  
  public boolean canLayout(o paramo)
  {
    return true;
  }
  
  public void doLayout(o paramo)
  {
    rc localrc = a();
    if (!o.eg)
    {
      if (localrc != null) {
        localrc.doLayout(paramo);
      }
      c(paramo);
    }
  }
  
  private void c(o paramo)
  {
    boolean bool = o.eg;
    int j = o.dg;
    p localp = new p(paramo);
    z localz = new z();
    k localk = paramo.c(oc.a);
    if (localk == null) {
      throw new IllegalStateException("No LabelLayoutData registered with graph!");
    }
    m localm = localp.w();
    d locald1;
    d locald2;
    wb[] arrayOfwb;
    kc[] arrayOfkc;
    int i;
    kc localkc;
    fd localfd;
    Object localObject;
    label231:
    do
    {
      if (!localm.e()) {
        break;
      }
      locald1 = localm.a();
      locald2 = (d)localp.t(locald1);
      arrayOfwb = localp.k(locald1);
      arrayOfkc = (kc[])localk.get(locald2);
      if (j != 0) {
        break label257;
      }
      i = 0;
      do
      {
        do
        {
          if (i >= arrayOfwb.length) {
            break label231;
          }
          localkc = arrayOfkc[i];
          localfd = localkc.g();
          if (j != 0) {
            break;
          }
          if (!localfd.j())
          {
            if (bool) {
              continue;
            }
            if (!localfd.l()) {}
          }
          else
          {
            localObject = (mc)arrayOfwb[i];
            ((mc)localObject).a(new a_(localkc, locald1));
            ((mc)localObject).a(((mc)localObject).a().a());
            ((mc)localObject).a(localkc.g());
            localz.add(localObject);
          }
          i++;
        } while (j == 0);
        localm.f();
      } while (bool);
    } while (j == 0);
    if (!bool)
    {
      if (localz.isEmpty()) {
        label257:
        return;
      }
      this.g.a(new b_());
      this.g.a(localp, new z(), localz);
    }
    localm = localp.w();
    label479:
    do
    {
      if (!localm.e()) {
        break;
      }
      locald1 = localm.a();
      locald2 = (d)localp.t(locald1);
      arrayOfwb = paramo.k(locald1);
      arrayOfkc = (kc[])localk.get(locald2);
      i = 0;
      do
      {
        do
        {
          if (i >= arrayOfwb.length) {
            break label479;
          }
          localkc = arrayOfkc[i];
          localfd = localkc.g();
          if (j != 0) {
            break;
          }
          if (!localfd.j())
          {
            if (bool) {
              continue;
            }
            if (!localfd.l()) {}
          }
          else
          {
            localObject = arrayOfwb[i];
            xb localxb = ((wb)localObject).a();
            a.d.o localo = localxb.a(localkc.a().f(), localp.e(locald1), localp.d(locald1.e()), localp.d(locald1.f()), ((wb)localObject).e());
            localkc.a(localo);
          }
          i++;
        } while (j == 0);
        localm.f();
      } while (bool);
    } while (j == 0);
  }
  
  static class b_
    implements gd
  {
    public double a(fc paramfc)
    {
      boolean bool = o.eg;
      if (!bool) {
        if (!(paramfc.k() instanceof wb)) {
          return 1.0D;
        }
      }
      wb localwb = (wb)paramfc.k();
      fd localfd = localwb.b();
      Object localObject = paramfc.q();
      if ((bool) || ((localObject instanceof kd.a_)))
      {
        kd.a_ locala_ = (kd.a_)localObject;
        if (!bool) {
          if (localfd.j()) {
            return 1.0D - locala_.e();
          }
        }
        if (localfd.l()) {
          return locala_.e();
        }
        return Math.abs(0.5D - locala_.e()) + 0.5D;
      }
      return 0.9D;
    }
  }
  
  private static class a_
    implements xb
  {
    kd a;
    kc b;
    d c;
    
    a_(kc paramkc, d paramd)
    {
      this.c = paramd;
      this.b = paramkc;
      if (!bool) {
        if (b())
        {
          if (bool) {
            break label60;
          }
          this.a = new kd((byte)1);
          if (o.dg == 0) {
            return;
          }
        }
      }
      label60:
      this.a = new kd((byte)0);
    }
    
    boolean b()
    {
      boolean bool = o.eg;
      fd localfd = this.b.g();
      if (!bool) {
        if (!localfd.n()) {
          if (bool) {
            break label35;
          }
        }
      }
      label35:
      return localfd.p();
    }
    
    public Object a(a.d.o paramo, zb paramzb, zc paramzc1, zc paramzc2)
    {
      throw new UnsupportedOperationException();
    }
    
    public Object a()
    {
      o localo = (o)this.c.c();
      zb localzb = localo.b(this.c);
      zc localzc1 = localo.k(this.c.e());
      zc localzc2 = localo.k(this.c.f());
      return this.a.a(this.b.a(), localzb, localzc1, localzc2);
    }
    
    public z a(wb paramwb, zb paramzb, zc paramzc1, zc paramzc2)
    {
      boolean bool = o.eg;
      int j = o.dg;
      kd.a_ locala_1 = (kd.a_)this.a.a(this.b.a(), paramzb, paramzc1, paramzc2);
      fd localfd = this.b.g();
      int i = localfd.a();
      z localz = this.a.a(paramwb, paramzb, paramzc1, paramzc2);
      Object localObject = localz.f();
      label206:
      label251:
      do
      {
        if (localObject == null) {
          break;
        }
        gc localgc = (gc)((v)localObject).c();
        if ((!bool) && (j != 0)) {
          break label357;
        }
        kd.a_ locala_2 = (kd.a_)localgc.q();
        if (!bool)
        {
          if (i == 1)
          {
            if (bool) {
              break label206;
            }
            if (locala_2.e() >= locala_1.e())
            {
              localz.h((v)localObject);
              if (bool) {
                continue;
              }
              if (j == 0) {
                break label281;
              }
            }
          }
          else
          {
            if (bool) {
              break label206;
            }
          }
        }
        else if (i == 2)
        {
          if (bool) {
            break label206;
          }
          if (locala_2.e() <= locala_1.e())
          {
            localz.h((v)localObject);
            if (bool) {
              continue;
            }
            if (j == 0) {
              break label281;
            }
          }
        }
        if (!bool) {
          if (localfd.n())
          {
            if (bool) {
              break label251;
            }
            if (locala_2.d() == 3)
            {
              localz.h((v)localObject);
              if (bool) {
                continue;
              }
              if (j == 0) {
                break label281;
              }
            }
          }
        }
        if (!bool)
        {
          if (localfd.p())
          {
            if (bool) {
              continue;
            }
            if (locala_2.d() == 4) {
              localz.h((v)localObject);
            }
          }
          localObject = ((v)localObject).a();
        }
      } while (j == 0);
      label281:
      label357:
      localObject = new gc(new w(this.b.d(), this.b.e()), new s(this.b.b(), this.b.c()), locala_1, paramwb, !b());
      localz.add(localObject);
      return localz;
    }
    
    public a.d.o a(s params, zb paramzb, zc paramzc1, zc paramzc2, Object paramObject)
    {
      return this.a.a(params, paramzb, paramzc1, paramzc2, paramObject);
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.y

 * JD-Core Version:    0.7.0.1

 */